﻿$(function () {
  /*setTimeout(function () {
    Common.checkLoginStatus();
  }, 500);*/

  /**
   * 泰笛WebApp
   * 泰笛App
   * 泰笛小程序
   */
  /**
   * App:
   *    https://m.24tidy.com/tidyCoupon/activity/coupon20210708/index.html?isApp=1
   * Web:
   *    https://m.24tidy.com/tidyCoupon/activity/coupon20210708/index.html?isWeb=1
   * 小程序:
   *    https://m.24tidy.com/tidyCoupon/activity/coupon20210708/index.html?isWX=1
   */
  let channel = '泰笛WebApp';
  let isApp = Common.GetQueryString("isApp") || ""
  let isWeb = Common.GetQueryString("isWeb") || ""
  let isWX = Common.GetQueryString("isWX") || ""

  getClient();

  $("body").on('click', ".btn-0415",
      function () {
        _hmt.push(['_trackEvent', "测试", "click_toBuy"]);
        // window.location.href = 'https://m.24tidy.com/activityportal/coopertate-tri/washGoods.html?alais=McTxApwhMpDA1NTQO0O0O&activityId=1985000017&channel=' + channel  + '&isH5=1';
        window.location.href = 'https://m.24tidy.com/washIndex.html?alais=McTxApwhMpDA1OTMO0O0O&activityId=1995000017&channel=' + channel  + '&isH5=1';
      }
  );
  $("body").on('click', ".btn-0416",
      function () {
        _hmt.push(['_trackEvent', "测试", "click_toBuy"]);
        // window.location.href = 'https://m.24tidy.com/activityportal/coopertate-tri/washGoods.html?alais=McTxApwhMpDA1NTQO0O0O&activityId=1985000017&channel=' + channel  + '&isH5=1';
        window.location.href = 'https://m.24tidy.com/washIndex.html?alais=McTxApwhMpDA1OTQO0O0O&activityId=2095000017&channel=' + channel  + '&isH5=1';
      }
  );

  function getClient() {
    if (+isApp === 1) {
      channel = '泰笛App';
    } else if (+isWeb === 1) {
      channel = '泰笛WebApp';
    } else if (+isWX === 1) {
      channel = '泰笛微信小程序';
    }
  }
});

